﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manage_Service_delQuestion : ManagePageBase {
    string result = "0";
    string ids = "";
    int cid = 0;
    protected void Page_Load(object sender, EventArgs e) {
        if (Request.Form["qid"] != null && Request.Form["qid"].Trim() != "") {
            ids = Request.Form["qid"].Trim(',');
        }
        if(!int.TryParse(Request.Form["cid"].Trim(), out cid)){
            ResponseWrite();
        }
        if(!IsPostBack){
            if(new Exam.Core.DAL.Question().Del(ids,cid)){
                result = "1";
                ResponseWrite();
            }
        }
    }

    private void ResponseWrite() {
        Response.Write(result);
        Response.End();
    }
}
